package com.thor.palmmall.rest.process.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.process.AProcessParam;
import com.thor.palmmall.spi.process.SProcessParam;

public class SProcessParamConverter implements Converter<AProcessParam,SProcessParam> {
  public static SProcessParamConverter getInstance() {
    if (instance == null)
      instance = new SProcessParamConverter();
    return instance;
  }

  private static SProcessParamConverter instance;

  @Override
  public SProcessParam convert( AProcessParam source) {
    if (source == null) {
      return null;
    }
    SProcessParam target = new SProcessParam();
    target.setUserId(source.getUserId());
    target.setPrefixs(source.getPrefixs());
    return target;
  }
}
